package com.gzhryc.log.dao.db;

import java.util.Date;

import com.gzhryc.common.config.EnumTools;
import com.gzhryc.jdbc.annotaion.Column;
import com.gzhryc.jdbc.annotaion.Id;
import com.gzhryc.jdbc.annotaion.Table;
import com.gzhryc.log.dao.enums.InsideMessageEnum;

/**
 * 站内消息
 * 
 * @author zhanghao
 *
 */
@Table(name = "log_inside_message")
public class InsideMessage {

	public static final String ENUM_TYPE = "InsideMessage.Type";

	@Id
	protected Long id;

	@Column(name = "user_id")
	protected String userId;

	@Column(length = 4)
	protected Integer type;

	@Column(length = 1024)
	protected String content;
	
	
	@Column(length = 1024,note="附带链接")
	protected String link;

	@Column(length = 4)
	protected Integer level; // 消息等级

	@Column(length = 4)
	protected Integer status;

	@Column(name = "update_date", autoUpdateTime = true)
	protected Date updateDate;

	@Column(name = "create_date")
	protected Date createDate;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	
	
	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public Integer getLevel() {
		return level;
	}

	public void setLevel(Integer level) {
		this.level = level;
	}

	

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	public String getTypeName(){
		return InsideMessageEnum.Type.note(this.type);
	}
	
	public String getStatusName() {
		return InsideMessageEnum.Status.note(this.status);
	}
}
